export {}

// 接口继承 extends

// 原价商品类型
interface GoodsType {
    id: string;
    price: number;
}

// 打折商品类型
interface DisGoodsType extends GoodsType {
    disPrice: number;
}

let list: DisGoodsType[] = [{
    id: '123',
    price: 1,
    disPrice: 1
}]
console.log(list)

// 定义接口返回值类型
interface Data {
    title: string,
    content: string
}
interface Res {
    code: number,
    msg: string,
    data: Data
}

let res: Res = {
    code: 200,
    msg: 'OK',
    data: {
        title: 'cs',
        content: '23456'
    }
}
console.log(res)